home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / bufsetup.cpp < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  41 lines

  1. #include <stdlib.h>
  2. #include "bufsetup.h"
  3.  
  4. BufferSetup::BufferSetup() : Bl(rect(30, 3, 73, 8), "",
  5.                     " Buffer parameters ", 6,
  6.         FIXED, SHOW_BORDER, SHOW_BORDER, 47, 16, 16)
  7.     {
  8.     FILE* f;
  9.     w = 639;
  10.     h = 479;
  11.  
  12.     buffer_width = new CaptureEditLine(loc(32, 5), 5,  "  Image Width ",
  13.         C_RIGHT);
  14.     buffer_height = new CaptureEditLine(loc(32, 6), 5, " Image Height ",
  15.         C_RIGHT);
  16.  
  17.     go = new Button(rect(60, 5, 72, 6),
  18.           "Save", BUTTON_BORDER, 16);
  19.  
  20.     go->set_ret(RET_OK | RET_MOUSE | RET_CANCEL);
  21.     insert(buffer_height, 1);
  22.     insert(buffer_width, 1);
  23.     insert(go, 1);
  24.     assign(buffer_width, cancel_element, AC_CANCEL);
  25.     buffer_width->set_ret(RET_CANCEL | RET_OK);
  26.     buffer_height->set_ret(RET_CANCEL | RET_OK);
  27.  
  28.     buffer_width->put_string("639");
  29.     buffer_height->put_string("479");
  30.     }
  31. /////////////////////////
  32. void BufferSetup::exe(int act)
  33.     {
  34.     Bl::exe(act);
  35.     w = atoi(buffer_width->get_string());
  36.     h = atoi(buffer_height->get_string());
  37.  
  38.     global_num = 1;
  39.     mouseHideCursor();
  40.     }
  41.